home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
LOGIC Apps
/
Logic-APPLE_II_APPS.iso
/
pc
/
LOGIC Apple II 5.25" Library - DOS Part 3
/
DOS065.dsk
/
ALL ACCOUNTS.bas
next >
Wrap
BASIC Source File
|
2012-02-16
|
3KB
|
110 lines
12 DIM S$(200)
100 HOME : PRINT "INSERT PFILE DISK AND HIT RETURN"
101 INPUT X$
102 NN = 450
105 DIM P$(NN)
110 Z$ = "<CTRL-D>"
111 PRINT Z$;"CATALOG"
120 PRINT Z$;"OPEN PFILE"
130 PRINT Z$;"READ PFILE"
140 FOR E = 0 TO NN
150 INPUT P$(E)
160 NEXT E
170 PRINT Z$;"CLOSE PFILE"
200 REM STATEMENT
205 INPUT "WHAT IS THE CURRENT BILLING DATE ";CD$:C1$ = CD$
206 M$ = LEFT$(CD$,2)
207 IF MID$ (CD$,2,1) = "/" THEN M$ = LEFT$(M$,1)
208 CD = VAL(M$)
209 TR = CD -1:SX = CD -2:NT = CD -3
210 IF CD = 1 THEN TR = TR +12:SX = SX +12:NT = NT +12
211 IF CD = 2 THEN SX = SX +12:NT = NT +12
212 IF CD = 3 THEN NT = NT +12
213 CD$ = STR$(CD)
218 PR# 1
220 REM ALL ACCOUNTS
221 GOSUB 5000
230 FOR A = 1 TO 200
232 A$ = STR$(A)
233 IF LEN(A$) = 3 THEN 235
234 A$ = "0" +A$: GOTO 233
235 FOR E = 0 TO NN
237 IF A$ = MID$ (P$(E),9,3) THEN 241
239 NEXT E
240 NEXT A
241 IF E >NN THEN E = NN
242 N$ = MID$ (P$(E),12,25)
250 REM 90 AND OVER
260 FOR E = 0 TO NN
270 IF A$ = MID$ (P$(E),9,3) THEN GOSUB 1000
280 NEXT E
293 V$ = ""
300 REM FOR 60 DAY
320 FOR E = 0 TO NN
330 IF A$ = MID$ (P$(E),9,3) THEN GOSUB 2000
335 NEXT E
355 V$ = ""
400 REM FOR 30 DAYS
420 FOR E = 0 TO NN
430 IF A$ = MID$ (P$(E),9,3) THEN GOSUB 3000
440 NEXT E
500 REM CURRENT
520 FOR E = 0 TO NN
530 IF A$ = MID$ (P$(E),9,3) THEN GOSUB 4000
540 NEXT E
600 FOR X = 1 TO 80: PRINT "-";: NEXT X
610 V = NB: GOSUB 6000:NB$ = V$
611 V = SB: GOSUB 6000:SB$ = V$
612 V = TB: GOSUB 6000:TB$ = V$
613 V = CB: GOSUB 6000:CB$ = V$
614 TB = TB +CB +NB +SB:V = TB: GOSUB 6000:T$ = V$
615 TB = 0:CB = 0:NB = 0:SB = 0
616 PRINT N$: PRINT A$; TAB( 10);" $";NB$;" $";SB$;
617 PRINT " $";TB$;" $";CB$;" $";T$
618 NEXT A
620 PR# 0
622 HOME
624 FOR X = 1 TO 10: PRINT CHR$(7): NEXT
680 PRINT "END OF PROGRAM THANK YOU": GOTO 999
1000 REM PRINT FOR 90&OVER
1010 IF NT = VAL( MID$ (P$(E),71,2)) THEN 1050
1011 IF SX = VAL( MID$ (P$(E),71,2)) THEN RETURN
1012 IF TR = VAL( MID$ (P$(E),71,2)) THEN RETURN
1013 IF CD = VAL( MID$ (P$(E),71,2)) THEN RETURN
1050 NB = NB + VAL( MID$ (P$(E),46,10))
1060 RETURN
2000 REM FOR 60 DAY
2010 IF SX = VAL( MID$ (P$(E),71,2)) THEN 2040
2020 RETURN
2040 SB = SB + VAL( MID$ (P$(E),46,10))
2050 RETURN
3000 REM SUB FOR 30 DAYS
3010 IF TR = VAL( MID$ (P$(E),71,2)) THEN 3040
3020 RETURN
3040 TB = TB + VAL( MID$ (P$(E),46,10))
3050 RETURN
4000 REM FOR CURRENT
4010 IF CD = VAL( MID$ (P$(E),71,2)) THEN 4040
4020 RETURN
4040 CB = CB + VAL( MID$ (P$(E),46,10))
4050 RETURN
5000 REM PRINTS HEADS
5005 PRINT "TODAYS DATE-";C1$
5010 PRINT "ACCOUNT # NAME ";
5011 PRINT " 90 DAYS+ ";" 60 DAYS ";
5012 PRINT " 30 DAYS ";" CURRENT ";" TOTAL "
5020 RETURN
6000 REM SUB FOR ROUND AND 10 PLACES
6001 IF V <0 THEN F8 = -1:V = V * -1
6005 V = INT(V *10 ^2 +.5)/ INT(10 ^2 +.5)
6010 IF V < > INT(V) THEN 6021
6020 V$ = STR$(V) +".00": GOTO 6040
6021 V1 = V - INT(V)
6022 V1 = INT(V1 *100 +.5)/100
6030 V$ = STR$(V1)
6031 IF LEN(V$) = 2 THEN V$ = V$ +"0"
6032 V$ = STR$( INT(V)) +V$
6033 IF F8 = -1 THEN V$ = "-" +V$
6040 IF LEN(V$) = >10 THEN 6050
6045 V$ = " " +V$: GOTO 6040
6050 F8 = 1: RETURN